package com.mvc.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @ProjectName: dior
 * @Package: com.mvc.model
 * @ClassName: SkuModel
 * @Description: sku模型
 * @Author: lenovo
 * @Date: 2021/12/16 21:18
 * @Version: 1.0
 **/
@Data
public class SkuModel {
    private Integer id;

    private String name;

    private BigDecimal price;

    private Integer num;
    /**
     * 所属spu
     */
    private Integer spu_id;
    /**
     * 商品规格
     */
    private List<SkuParam> specifications;

    private Integer status;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date update_time;

    private List<ImgModel> imgList;
}
